#include <stdio.h>
// 定义一个二维数组,存入五个同学的数学、语文、英语、物理、化学5门课程的成绩，计算并输出每一门课程的平均成绩和每-位学生的平均成绩，
int main()
{
    int score[5][5] = {
        {91, 92, 93, 94, 80},
        {71, 72, 73, 74, 60},
        {81, 82, 83, 84, 70},
        {91, 92, 93, 94, 95},
        {81, 82, 83, 84, 85}};

    float yuwen = 0, shuxue = 0, yingyu = 0, wuli = 0, huaxue = 0;
    float average[5] = {0};
    for (int i = 0; i < 5; i++)
    {
        for (int j = 0; j < 5; j++)
        {
            average[i] += score[i][j];
        }
        shuxue += score[i][0];
        yuwen += score[i][1];
        yingyu += score[i][2];
        wuli += score[i][3];
        huaxue += score[i][4];
    }

    // 各科平均成绩:
    printf("数学平均成绩:%.1f\n语文平均成绩:%.1f\n英语平均成绩:%.1f\n物理平均成绩:%.1f\n化学平均成绩:%.1f\n", shuxue / 5, yuwen / 5, yingyu / 5, wuli / 5, huaxue / 5);
    // 各个同学的平均成绩:
    for (int i = 0; i < 5; i++)
    {
        printf("第%d位同学的平均成绩位:%.1f\n", i + 1, average[i] / 5);
    }
}